//
//  Regex.h
//  parser
//
//  Created by Daniel Braun on 04/05/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import <regex.h>


@interface DBRegex : NSObject {
	regex_t regex;
	BOOL hasRegex;
	NSString *pattern; // for description and save/restore
}

- (BOOL) matchInString:(NSString *)s;
- (NSRange) matchRangeInString:(NSString *)s;
- (int) matchStartOfString:(NSString *)s;

- (id) initWithPattern:(NSString *)s;
+ (id) regexWithPattern:(NSString *)s;
- (NSRange) matchRangeInString:(NSString *)s offset:(int)l;

@end
